angular.module('myapp')
    .controller('menuCtrl', ['$scope', '$mdSidenav', '$location', function ($scope, $mdSidenav, $location) {

        $scope.$on('$locationChangeSuccess', function () {
            $scope.path = $location.path().substring(1);
        });


        $scope.$emit('$locationChangeSuccess');

    }]);
